home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / dbase / vpi1manl.zip / PART4.MAN < prev    next >
Text File  |  1991-12-25  |  50KB  |  1,478 lines

  1.      VP-Info Level 1 Reference Manual           Page 381          SECTION 4
  2.  
  3.  
  4.                                       TEXT
  5.  
  6.  
  7.      Send text to screen or printer.
  8.  
  9.      ╔════════════════════════════════════════════════════════════════════╗
  10.      ║ TEXT [<file>/.<volume>/M.<memo>]                                   ║
  11.      ╟────────────────────────────────────────────────────────────────────╢
  12.      ║ Options:                                                           ║
  13.      ║                                                                    ║
  14.      ║ <file>    the name of the text file to use                         ║
  15.      ║ <volume>  the number of a volume in the current library; a         ║
  16.      ║             numeric constant                                       ║
  17.      ║ <memo>    the name of a memo field in the current data file        ║
  18.      ╚════════════════════════════════════════════════════════════════════╝
  19.  
  20.           The TEXT command has two forms.  The first form is the
  21.      TEXT/ENDTEXT program structure:
  22.  
  23.      TEXT
  24.         <text>
  25.      ENDTEXT
  26.  
  27.           All lines following the TEXT command up to ENDTEXT are displayed
  28.      on the screen or if the command SET PRINT ON was given, then also sent
  29.      to the printer.
  30.  
  31.           The second form is:
  32.  
  33.      TEXT <file>/.<volume>/M.<memo>
  34.  
  35.      where the text is taken from the file <file> (default extension TXT),
  36.      from the numbered volume in the current library (see SET LIBRARY TO
  37.      command), or from a memo in a data file.  This is the same as
  38.  
  39.      TEXT
  40.         the text from <file> or <volume> or <memo>
  41.      ENDTEXT
  42.  
  43.           The second form is preferable in many circumstances, since it:
  44.  
  45.                1.   Keeps the size of the program module down
  46.  
  47.                2.   Allows manipulation of the text in <file>, <volume>
  48.                     or <memo>
  49.  
  50.                3.   Allows the choice of text to be used, since <file> can
  51.                     be a macro, and <volume> can be a numeric expression. In
  52.                     the case of memos, every recored can have different text.
  53.  
  54.  
  55.      TEXT                       VPI1  VPI  VPIN                        TEXT
  56.      VP-Info Level 1 Reference Manual           Page 382          SECTION 4
  57.  
  58.  
  59.           Note that library volumes are addressed by placing a period in
  60.      front of the volume number, which can be either a numeric constant or
  61.      a numeric expression.  Memos are addressed by preceding the field name
  62.      with "M."  Do not confuse this usage of periods with a decimal point.
  63.  
  64.           TEXT macros.
  65.  
  66.           Contents of fields and variables can be merged into text blocks
  67.      for data input, reporting, listing and mail-merge applications.
  68.      VP-Info Level 1 provides four special macro symbols for this purpose
  69.      as follows:
  70.                                         Fixed position    Floating position
  71.            Input macros (display/edit)         @                   %
  72.           Output macros (display only)         #                   &
  73.  
  74.           When a text macro symbol is encountered, VP-Info Level 1 does the
  75.      following:
  76.  
  77.                1.   Checks whether the following characters are the name of
  78.                     a field in the selected file.  If it is, the current
  79.                     contents of the field replaces &<var> in the text.
  80.  
  81.                2.   If not a field name, then the characters following the
  82.                     macro symbol are assumed to be a memory variable name.
  83.                     If that name is valid, the contents of the memory
  84.                     variable replaces <var> in the text.
  85.  
  86.                3.   If <var> is neither a field nor a variable, it is
  87.                     assumed not to be a macro, and both the macro symbol
  88.                     and <var> are output as a literal.
  89.  
  90.           When the macro symbol & is used and SET TRIM ON, <var> is trimmed
  91.      before it is merged.  The position of all text to the right of <var>
  92.      in the same line is adjusted so that the number of spaces after <var>
  93.      in the output is the same as in the TEXT, no matter how wide <var> is.
  94.  
  95.                Caution: In a TEXT macro, <variable> must be terminated by
  96.           blank, tab, punctuation mark, or a macro symbol; it cannot be
  97.           terminated by a graphics character (since in many non-English
  98.           character sets these characters are normal or accented
  99.           alphanumeric characters).  It also cannot be terminated by a
  100.           colon or an underscore, since these are valid parts of a field or
  101.           variable name.
  102.  
  103.           Output (list processing).
  104.  
  105.           This command can be used to do list processing.
  106.  
  107.           Any variable (field, memory variable, or system variable) can be
  108.      merged into the document and output by using &<var> or #<var> in the
  109.      text.
  110.  
  111.      TEXT                       VPI1  VPI  VPIN                        TEXT
  112.      VP-Info Level 1 Reference Manual           Page 383          SECTION 4
  113.  
  114.  
  115.  
  116.           As described above, the & macro will trim the contents of <var>
  117.      when output when SET TRIM ON, and always adjusts the material to its
  118.      right on the same line depending on the width of the contents of
  119.      <var>.  Sometimes, it is more useful to output at an absolute location
  120.      with a variable (as opposed to merging); to do this use the #<var>
  121.      form.  #<var> does not trim or adjust the position of other items on
  122.      the line, creating the possibility that later items in the line may be
  123.      overwritten.
  124.  
  125.           A paragraph is a portion of the text between two carriage returns
  126.      (obtained by hitting <ENTER>).  A paragraph is formatted by the TEXT
  127.      command using word wrap (if there is not enough room for a word on a
  128.      line, it is displayed/printed at the start of the next line).  The
  129.      page width and the left margin are set by the SET WIDTH and the SET
  130.      MARGIN commands (see SET WIDTH and SET MARGIN).
  131.  
  132.           Control codes can be sent from the text using the symbols ^
  133.      (caret) and \ (backslash).
  134.  
  135.           The caret.  When VP-Info Level 1 comes across a ^, it checks for
  136.      the next character.  If the next character is also a ^, the two
  137.      characters are sent as a single ^.  If the next character is not a ^,
  138.      it is sent as a control character; for instance, ^C is sent as Ctrl-C.
  139.  
  140.           Examples for ^:
  141.  
  142.      ^^        sent as ^
  143.      ^C        sent as Ctrl-C
  144.      ^^C       sent as ^C
  145.  
  146.           The backslash.  When VP-Info Level 1 comes across a \, it checks
  147.      for the next character.  If the next character is also a \, the two
  148.      characters are sent as a single \.  If the next character is not a \,
  149.      VP-Info Level 1 checks for digits; it grabs as many digits as there
  150.      are, up to three.  The digits are converted into a number, and the
  151.      number is sent as a code between 0 and 255.
  152.  
  153.           Examples for \:
  154.  
  155.      \\        sent as \
  156.      \2a       sent as code 2, followed by a
  157.      \0020     sent as code 2, followed by the character 0 (002 is
  158.                  the 2)
  159.      \27x\000  sent as code 27 (escape), x, code 0
  160.  
  161.           Examples:
  162.  
  163.      TEXT
  164.      This text will be sent to the screen or the printer.  You can set the<
  165.  
  166.  
  167.  
  168.      TEXT                       VPI1  VPI  VPIN                        TEXT
  169.      VP-Info Level 1 Reference Manual           Page 384          SECTION 4
  170.  
  171.  
  172.      left margin and the text width.  The text is automatically word<
  173.      wrapped.
  174.      ENDTEXT
  175.  
  176.           Now the same in letter quality mode on the Epson LQ-1500 printer:
  177.  
  178.      TEXT
  179.      \27x\001This text will be sent to the screen or the printer.  You can<
  180.      set the left margin and the text width.  The text is automatically<
  181.      word wrapped.
  182.      ENDTEXT
  183.  
  184.           Input screen painting.
  185.  
  186.           The TEXT command can be used "to paint" input screens.  @<var> is
  187.      a GET, activated by a READ command.
  188.  
  189.           @<var> also has a floating-position form, %<var>, which adjusts
  190.      the material to its right on the same line depending on the width of
  191.      the contents of <var>.
  192.  
  193.           Neither @<var> nor %<var> trims the present contents of the
  194.      variable.
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.      TEXT                       VPI1  VPI  VPIN                        TEXT
  225.      VP-Info Level 1 Reference Manual           Page 385          SECTION 4
  226.  
  227.  
  228.           Examples:
  229.  
  230.      TEXT
  231.           @fname              @name               @dept
  232.      ENDTEXT
  233.  
  234.      TEXT
  235.           %fname  %name  %dept
  236.      ENDTEXT
  237.  
  238.      Both create a one-line input format that can be used with BROWSE OFF
  239.      (or, if the macro line is placed in a text file, with BROWSE TEXT.
  240.      The second form is easier to use, since there is no concern about the
  241.      width of the various fields.  For example, the maximum width available
  242.      for NAME in the first form is 20 characters; if it is 20, it runs into
  243.      DEPT, and if more than 20, it will suppress DEPT input completely.
  244.  
  245.           Formats in TEXT.
  246.  
  247.           TEXT formats let you control the display on fields and variables
  248.      used in TEXT macros.  They are similar to the formats used in the
  249.      PICTURE and USING clauses of the @ command (see @ for format rules and
  250.      examples).
  251.  
  252.           In TEXT blocks and files, formats must appear at the beginning of
  253.      the block, with a separate line for each formatted variable.  Each
  254.      line must begin with two periods and a space, followed by the name of
  255.      the field or variable, a comma, and the format picture.  Examples:
  256.  
  257.      .. cust,!!!!-!-99
  258.      .. today,99/99/99
  259.      .. balance,$$$$$$$$$9,99>
  260.      .. price,$$,$$$.99
  261.      .. codes#3,' xxx xxx xxx '
  262.      .. exception,'First: "xxxxxxxxxx"'
  263.  
  264.           Format lines may not contain comments, and need no quote marks
  265.      unless the format itself includes leading or trailing blanks (not
  266.      recommended) or quote marks of the other type; see last two example
  267.      above.
  268.  
  269.           If a field is not in the selected data file, be sure to use field
  270.      redirection as in CODES#3 above.
  271.  
  272.           Effect of SET TEXT ON/OFF and CLEAR GETS.
  273.  
  274.           A Get Table with room for up to 64 gets is available for full-
  275.      screen editing commands, like READ, EDIT, and BROWSE.  Whenever a GET
  276.      is issued (either by TEXT or @ GET), it is entered into the Get Table
  277.      so that VP-Info Level 1 can rapidly ascertain its position and format
  278.  
  279.  
  280.  
  281.      TEXT                       VPI1  VPI  VPIN                        TEXT
  282.      VP-Info Level 1 Reference Manual           Page 386          SECTION 4
  283.  
  284.  
  285.      during later processing.
  286.  
  287.           When SET TEXT ON, the TEXT display macros created with & and #
  288.      are put into the Get Table. This setting is usually required for input
  289.      screens created with TEXT.
  290.  
  291.           When SET TEXT OFF, display macros are not put into the Get Table.
  292.      This setting is required when using TEXT for printer output, as in
  293.      mail-merge programs, to avoid trying to create a 65th entry in the Get
  294.      Table.  Over-filling the Get Table is an error that causes termination
  295.      of a program.
  296.  
  297.           It is good practice to place a CLEAR GETS command before the TEXT
  298.      command to ensure that the Get Table is empty before starting to fill
  299.      it again.
  300.  
  301.           Examples:
  302.  
  303.           1.   A text file used in data input with EDIT TEXT (see screen
  304.      output in EDIT command section):
  305.  
  306.      .. zip,!9! 9!9
  307.      .. phone,999-9999 (999)
  308.      .. wphone,999-9999 (999)
  309.      .. training,99/99
  310.  
  311.            NAME...........  %FNAME  %NAME
  312.  
  313.            ADD_1..........  %ADD_1  %AREA
  314.            ZIP............  @ZIP
  315.  
  316.            PHONE..........  @PHONE
  317.            WPHONE.........  @WPHONE
  318.  
  319.            EXPERIENCE.....
  320.                @EXPERIENCE
  321.            COMMENTS
  322.                @COMMENT1
  323.                @COMMENT2
  324.  
  325.           2.   A program that does formatted output from a data file,
  326.      including multi-line output from certain fields:
  327.  
  328.      SET PRINT ON
  329.      SET TEXT OFF
  330.      SET MARGIN TO 0
  331.      SET WIDTH TO 80
  332.      IF row()>1                     ;if current row not at top of form,
  333.         SPOOL junk                   ;  eject into throw-away spool file
  334.         EJECT
  335.         SPOOL
  336.      ENDIF
  337.  
  338.      TEXT                       VPI1  VPI  VPIN                        TEXT
  339.      VP-Info Level 1 Reference Manual           Page 387          SECTION 4
  340.  
  341.  
  342.      USE customer INDEX customer
  343.      page=1
  344.      PERFORM heading
  345.      DO WHILE .not. eof
  346.         IF ROW()>50                  ;start new page if past line 50
  347.            EJECT
  348.            PERFORM heading
  349.         ENDIF
  350.         nameline=TRIM(fname)+' '+TRIM(name)
  351.         address=TRIM(addr:1)+' '+TRIM(addr:2)+' '+TRIM(city)
  352.         remarks=comments
  353.         nameline2=WRAP(nameline,15)  ;WRAP( function trim long strings,
  354.         address2=WRAP(address,17)    ;  leaving remainder for next line
  355.         remarks2=WRAP(remarks,20)
  356.      *  text for main line includes customer number, formatted with picture
  357.         TEXT
  358.      .. cust,xxx-x-xx
  359.      #cust    #nameline2      #address2         #remarks2
  360.         ENDTEXT
  361.      *  test in next line depends on fact that concatenating several fields
  362.      *    of blanks and then trimming the result leaves a single blank
  363.         DO WHILE ' '<>TRIM(nameline+address+remarks)
  364.            IF ROW()>55               ;start new page if past line 55
  365.               EJECT
  366.               PERFORM heading
  367.            ENDIF
  368.            nameline2=WRAP(nameline,15)
  369.            address2=WRAP(address,17)
  370.            remarks2=WRAP(remarks,20)
  371.      *     text same as main text except customer number omitted
  372.            TEXT
  373.               #nameline2      #address2         #remarks2
  374.            ENDTEXT
  375.         ENDDO
  376.         ?                           ;skip line after every customer
  377.         SKIP                        ;get next customer record
  378.      ENDDO
  379.      EJECT
  380.      SET PRINT OFF
  381.      *
  382.      PROCEDURE heading
  383.         ? DATE(full)
  384.         ?? BLANK(52-col()),'Page '+LTRIM(STR(page,5))
  385.         ? CEN(:COMPANY,60)
  386.         ? CEN('Current Customer Listing',60)
  387.         ?
  388.         ? 'Number   Name            Address           Comments'
  389.         ? '======== =============== ================= ===================='
  390.         ?
  391.         page=page+1
  392.      ENDPROCEDURE heading
  393.  
  394.  
  395.      TEXT                       VPI1  VPI  VPIN                        TEXT
  396.      VP-Info Level 1 Reference Manual           Page 388          SECTION 4
  397.  
  398.  
  399.      *
  400.      PROCEDURE heading
  401.         ?
  402.         ?? DATE(full)
  403.         ?? BLANK(52-col()),'Page '+LTRIM(STR(page,5))
  404.         ? CEN(:COMPANY,60)
  405.         ? CEN('Current Customer Listing',60)
  406.         ?
  407.         ? 'Number   Name            Address           Comments'
  408.         ? '======== =============== ================= ===================='
  409.         ?
  410.         page=page+1
  411.      ENDPROCEDURE heading
  412.  
  413.           Sample output:
  414.  
  415.      Saturday, March 31, 1990                             Page 1
  416.                        Computer Resellers Corp.
  417.                        Current Customer Listing
  418.  
  419.      Number   Name            Address           Comments
  420.      ======== =============== ================= ====================
  421.  
  422.      ALB-A-65 Arthur          876 Main Street   Develops LAN-based
  423.               Albredge        Suite 987A San    software
  424.                               Francisco
  425.  
  426.      BRO-W-53 Walter          Freeridge         Hard-disk
  427.               Brownstone      Company 8765      controller and
  428.                               Corvis Drive San  cache expert
  429.                               Jose, CA
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.      TEXT                       VPI1  VPI  VPIN                        TEXT
  453.      VP-Info Level 1 Reference Manual           Page 388.1          SECTION 4
  454.  
  455.  
  456.                               Note on TEXT Command
  457.  
  458.           The two primary uses of TEXT are list processing (output) and
  459.      screen design (input).  Since Info cannot "know" which purpose you
  460.      have in mind when your execute the command, you should "tell" Info how
  461.      the TEXT command should be implemented.  Use the SET TEXT OFF command
  462.      for list processing, and SET TEXT ON for screen painting.
  463.  
  464.           SET TEXT controls the way the & and # macros are handled during
  465.      execution of the TEXT command, as follows:
  466.  
  467.                *ON       The TEXT display macros created with & and # are
  468.                          put into the Get Table; usually required for input
  469.                          screens created with TEXT.
  470.                OFF       Display macros are not put into the Get Table;
  471.                          usually required when using TEXT for printer
  472.                          output, as in mail-merge programs.
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.      TEXT                       VPI1  VPI  VPIN                        TEXT
  509.      VP-Info Level 1 Reference Manual           Page 389          SECTION 4
  510.  
  511.  
  512.  
  513.                                      TOTAL
  514.  
  515.      Summarize the information from the selected file (indexed) to a new
  516.      file.
  517.  
  518.      ╔════════════════════════════════════════════════════════════════════╗
  519.      ║ TOTAL [<scope>] ON <str exp> TO <file> [FIELDS <field list>]       ║
  520.      ║      [FOR <cond>]                                                  ║
  521.      ║                                                                    ║
  522.      ║ <str exp>    trigger expression                                    ║
  523.      ║ <file>       new file to contain summary information               ║
  524.      ╟────────────────────────────────────────────────────────────────────╢
  525.      ║ Options:                                                           ║
  526.      ║                                                                    ║
  527.      ║ <scope>               selection of records by scope                ║
  528.      ║                          (default scope: ALL)                      ║
  529.      ║ FIELDS <field list>   the fields to be totalled                    ║
  530.      ║ FOR <cond>            selection of records by <cond>               ║
  531.      ╚════════════════════════════════════════════════════════════════════╝
  532.  
  533.           The selected file must be indexed or sorted on <str exp>.  The
  534.      records of the selected file can be grouped by the value of <str exp>:
  535.      in each group <str exp> has the same value.
  536.  
  537.           This command creates a new file <file>; for each group of records
  538.      of the selected file, a record is entered in the new file.
  539.  
  540.           This new record is the same as the first record of the group,
  541.      except that the numeric fields in the <field list> are replaced by
  542.      their total for all the records in the group.  (Specifying a logical
  543.      or a character field in the <field list> will cause an error.)
  544.  
  545.           Deleted records are ignores irrespective of SET DELETED command.
  546.  
  547.           The following steps describe in detail how this command works:
  548.  
  549.           Step 1. Copies the structure of the selected file to <file>.
  550.  
  551.           Step 2. Appends the first record which satisfies the FOR clause
  552.      (note also scope, deleted records are disregarded) from the selected
  553.      file to the new file.
  554.  
  555.           Step 3. Evaluates <str exp> and saves it in a temporary variable.
  556.  
  557.           Step 4. Takes all subsequent records (if any) for which <str exp>
  558.      does not change. Adds up the fields in the FIELDS clause (if any) and
  559.      stores the sum in the record appended to <file> while <str exp>
  560.      continues to match the value saved in the temporary variable.
  561.  
  562.  
  563.  
  564.  
  565.  
  566.      TOTAL                      VPI1  VPI  VPIN                       TOTAL
  567.      VP-Info Level 1 Reference Manual           Page 390          SECTION 4
  568.  
  569.  
  570.           Step 5. Continue with Step 2, using the first record for which
  571.      <str exp> has a new value.
  572.  
  573.           If no FIELDS clause is in the command line no addition is
  574.      performed, and the resulting file consists only of the first record
  575.      encountered for each different value of <str exp>.  A frequent use of
  576.      this feature is to purge the file of records with duplicate keys.
  577.  
  578.           See also the related commands: POST and UPDATE.
  579.  
  580.           Example:  Use the ORDER file to find out which STYLE:NO and COLOR
  581.      have been ordered:
  582.  
  583.      1>USE order
  584.      1>LIST style:no+color
  585.            1  A120B1
  586.            2  C001R3
  587.            3  M100G5
  588.            4  A120B1
  589.            5  M100G5
  590.  
  591.           Of course, this way you get a lot of duplicates.  To get each
  592.      STYLE:NO+COLOR only once, make the file STYLESUM (style summary) with
  593.      TOTAL:
  594.  
  595.      1>INDEX ON style:no+color TO order
  596.            5 RECORDS IN TOTAL INDEXED
  597.      1>TOTAL ON style:no+color TO stylesum
  598.            5 TOTAL(S)
  599.      1>USE stylesum
  600.      1>LIST inven:no, style:no, color
  601.            1  AB0011 A120 B1
  602.            2  AB0110 C001 R3
  603.            3  QA1001 M100 G5
  604.  
  605.           This is the desired list.
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.      TOTAL                      VPI1  VPI  VPIN                       TOTAL
  624.      VP-Info Level 1 Reference Manual           Page 391          SECTION 4
  625.  
  626.  
  627.  
  628.                                      UNLOCK
  629.  
  630.      Unlock the current record.
  631.  
  632.      ╔════════════════════════════════════════════════════════════════════╗
  633.      ║ UNLOCK             VP-Info Network Edition only                    ║
  634.      ╚════════════════════════════════════════════════════════════════════╝
  635.  
  636.           This command unlocks the current record previously locked.  See
  637.      the SET NETWORK command on how to get into the multi-user mode.  See
  638.      also LOCK.
  639.  
  640.           Example:
  641.  
  642.      mcust=cust
  643.      FIND &mcust
  644.      LOCK
  645.      REPLACE balance with 0
  646.      UNLOCK
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.      UNLOCK                           VPIN                           UNLOCK
  681.      VP-Info Level 1 Reference Manual           Page 392          SECTION 4
  682.  
  683.  
  684.  
  685.                                  UNLOCK INDEXES
  686.  
  687.      Unlock all indexes on the selected data file.
  688.  
  689.      ╔════════════════════════════════════════════════════════════════════╗
  690.      ║ UNLOCK INDEXES             VP-Info Network Edition only            ║
  691.      ╚════════════════════════════════════════════════════════════════════╝
  692.  
  693.           This command unlocks the indexes previously locked on the
  694.      selected data file with the LOCK INDEXES command.
  695.  
  696.           See the SET NETWORK command on how to get into the multi-user
  697.      mode.  See also LOCK INDEXES.
  698.  
  699.           Example:
  700.  
  701.      UNLOCK INDEXES
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.      UNLOCK INDEXES                   VPIN                   UNLOCK INDEXES
  738.      VP-Info Level 1 Reference Manual           Page 393          SECTION 4
  739.  
  740.  
  741.  
  742.                                      UPDATE
  743.  
  744.      Update the selected file from an indexed file by replacing selected
  745.      fields.
  746.  
  747.      ╔════════════════════════════════════════════════════════════════════╗
  748.      ║ UPDATE FROM [<scope>] <file number> ON <str exp> [REPLACE <field1> ║
  749.      ║      WITH <exp1>,...,<fieldn> WITH <expn>] [FOR <cond>]            ║
  750.      ║                                                                    ║
  751.      ║ <file number>     the location of the FROM file                    ║
  752.      ║ <str exp>         the expression that is the key for finding       ║
  753.      ║                      the record in the FROM file                   ║
  754.      ╟────────────────────────────────────────────────────────────────────╢
  755.      ║ Options:                                                           ║
  756.      ║                                                                    ║
  757.      ║ <scope>         selection restricted by scope (default scope: ALL) ║
  758.      ║ REPLACE <field1> WITH <exp1>,...,<fieldn> WITH <expn>              ║
  759.      ║                 where field1,..,fieldn are fields of the file      ║
  760.      ║                    in use                                          ║
  761.      ║                 <exp1>,...,<expn> are expressions involving fields ║
  762.      ║                    of both files                                   ║
  763.      ║ FOR <cond>      selection restricted by <cond>                     ║
  764.      ╚════════════════════════════════════════════════════════════════════╝
  765.  
  766.           The selected file need not be indexed.  This procedure takes all
  767.      the appropriate records of the selected file one at a time.
  768.  
  769.           The FROM file has to be indexed by <str exp>; the expression,
  770.      <str exp>, is made up of character fields shared by the two files, and
  771.      by memory variables and constants.
  772.  
  773.           This procedure works as follows:
  774.  
  775.                1.   Takes the first appropriate record (that is, the first
  776.                     non-deleted record satisfying the <cond> and within the
  777.                     scope).
  778.  
  779.                2.   Evaluates <str exp> in the selected file.
  780.  
  781.                3.   Finds the first matching record in the FROM file.
  782.  
  783.                     a.   If the FIND is not successful, an "UPDATE ERROR"
  784.                          message is sent showing both the record number and
  785.                          the value of <str exp> in the selected file.  If
  786.                          SET PRINT ON, messages are sent to the printer.
  787.  
  788.                     b.   If the FIND is successful, the procedure replaces
  789.                          the fields of the selected file with the
  790.                          expressions, <str exp>, made up of fields of both
  791.  
  792.  
  793.  
  794.      UPDATE                     VPI1  VPI  VPIN                      UPDATE
  795.      VP-Info Level 1 Reference Manual           Page 394          SECTION 4
  796.  
  797.  
  798.                          files.  All fields names are assumed to be in the
  799.                          updating file, so make sure #n is attached to any
  800.                          field names from the FROM file.
  801.  
  802.                4.   Procedure continues with the next appropriate record as
  803.                     long as records remain within the <scope>.
  804.  
  805.           If there is no REPLACE clause, UPDATE simply checks whether all
  806.      the expected records of the FROM file are present.
  807.  
  808.           See also the commands: POST and TOTAL.  SET ADD ON has no effect
  809.      on UPDATE.
  810.  
  811.           Example:
  812.  
  813.           The cost of an item is kept updated in the INVENTRY file.  To
  814.      update the COST in the ORDER file:
  815.  
  816.      1>USE#4 inventry INDEX inventry
  817.      1>USE order
  818.      1>UPDATE FROM 4 ON inven:no REPLACE cost WITH cost#4
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.      UPDATE                     VPI1  VPI  VPIN                      UPDATE
  852.      VP-Info Level 1 Reference Manual           Page 395          SECTION 4
  853.  
  854.  
  855.  
  856.                                       USE
  857.  
  858.      Open data file for use, optionally, with index files.
  859.  
  860.      ╔════════════════════════════════════════════════════════════════════╗
  861.      ║ USE <file> [INDEX <file list>] [<mode>] [COMPILE]                  ║
  862.      ║                                                                    ║
  863.      ║ <file>    the data file to use                                     ║
  864.      ╟────────────────────────────────────────────────────────────────────╢
  865.      ║ Option:                                                            ║
  866.      ║                                                                    ║
  867.      ║ INDEX <file list>    list of index file names to use               ║
  868.      ║ <mode>               the file access mode under which DOS is to    ║
  869.      ║                        open the file                               ║
  870.      ║ COMPILE              open data file at compile time only           ║
  871.      ╚════════════════════════════════════════════════════════════════════╝
  872.  
  873.           The command USE opens a data file for use.  To open one or more
  874.      index files with the data file, use INDEX and the index file name(s).
  875.      The first index file is the Master Index; this one is in use with the
  876.      FIND, LIST, SKIP, etc. commands.  All other index files named will be
  877.      updated by all commands.
  878.  
  879.           The option COMPILE is used to open a data file at compile time
  880.      only.  It is used in situations where the data file to be used at run
  881.      time is not available at compile time.  One remedy is to put the name
  882.      of the data file in a macro, but then all the field names must be in
  883.      macros.  COMPILE offers a better solution if a data file with the same
  884.      structure is available at compile time.  For example,
  885.  
  886.      USE inven COMPILE
  887.      USE &file INDEX &file2
  888.  
  889.      will open the data file INVEN at compile time only.  At compile time
  890.      the command: USE &file index &file2 is ignored.  Now if the structure
  891.      of INVEN is the same as the structure of the data file(s) whose name
  892.      will appear in &file, then the program can use the field name without
  893.      macros.  Note that index files are not opened at compile time, so the
  894.      same problem does not effect index files.
  895.  
  896.           Caution: Avoid using data and index file names that start with
  897.           the letters "COMP", since the compiler may mistake the file name
  898.           for the COMPILE keyword and make it impossible to use the file in
  899.           a program.
  900.  
  901.           VP-Info Professional supports four different modes (READ, WRITE,
  902.      LOCK, and SHARE).  VP-Info Level 1 support only one mode (READ),
  903.      although the other modes are recognized for compatibility and cause no
  904.      error in any version.  The meaning of the four modes is as follows:
  905.  
  906.  
  907.  
  908.      USE                        VPI1  VPI  VPIN                         USE
  909.      VP-Info Level 1 Reference Manual           Page 396          SECTION 4
  910.  
  911.  
  912.  
  913.           LOCK - Open the file for both reading and writing, and maintain
  914.                exclusive use; allow no other users on a network to read or
  915.                write to the file while it is open in LOCK mode.  This is
  916.                the default mode for all versions.
  917.  
  918.           WRITE - Open the file for both reading and writing, and allow no
  919.                other users on a network to write to the file, but allow
  920.                other users to open the file in READ mode.
  921.  
  922.           READ - Open the file for reading only, without restricting other
  923.                users on a network from opening it in WRITE or SHARE mode.
  924.                When not on a network, READ mode is useful in ensuring that
  925.                changes made to a file are not saved to disk.
  926.  
  927.           SHARE - Open the file for both reading and writing, without
  928.                restricting the ability of others on a network
  929.  
  930.           See also SET INDEX TO.
  931.  
  932.           Examples:
  933.  
  934.           1. To open a data file as file 5 while currently you are on file
  935.      2:
  936.  
  937.      2>USE#5 customer
  938.      2>USE#2 invoice INDEX invoice
  939.      2>USE#1 sales INDEX color,style,ddate
  940.  
  941.           Three data files were opened under the appropriate file numbers.
  942.      Note that the default file number is still 2; the index files are
  943.      separated by commas.
  944.  
  945.           2.  To open a file in READ mode before using EDIT to check data
  946.      without the risk of writing any changes back to disk:
  947.  
  948.      1>USE employee INDEX emplname READ
  949.      1>FIND TAYLOR
  950.      1>EDIT
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.      USE                        VPI1  VPI  VPIN                         USE
  966.      VP-Info Level 1 Reference Manual           Page 397          SECTION 4
  967.  
  968.  
  969.  
  970.                                    VARIABLES
  971.  
  972.  
  973.      Enters a list of memory variable names into the variables table.
  974.  
  975.      ╔════════════════════════════════════════════════════════════════════╗
  976.      ║ VARIABLES <variables list>                                         ║
  977.      ║                                                                    ║
  978.      ║ <variables list>  list of memory-variable names                    ║
  979.      ╚════════════════════════════════════════════════════════════════════╝
  980.  
  981.           VP-Info Level 1 allows up to 128 variables to be defined at a
  982.      time.  Their names are listed in a variables table, which is displayed
  983.      with the LIST MEMORY command.
  984.  
  985.           When a program is compiled, each time VP-Info Level 1 encounters
  986.      a name not already in the table, it is added.  As a programmer, you
  987.      can control the order of variables in the table by naming them in the
  988.      variables list with the VARIABLES command.  This is not only good
  989.      practice in general, but it can help in debugging, and makes it
  990.      possible to be sure every variable you use is being defined, and that
  991.      no others are being inadvertently created.
  992.  
  993.           The variables command should never be used in a subroutine, and
  994.      can be used only once in the main routine.  It should come after any
  995.      GLOBAL command, but before any other variable is defined.
  996.  
  997.           Example in a program:
  998.  
  999.      VARIABLES start,finish,mcust,mserial
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.      VARIABLES                  VPI1  VPI  VPIN                   VARIABLES
  1023.      VP-Info Level 1 Reference Manual           Page 398          SECTION 4
  1024.  
  1025.  
  1026.  
  1027.                                       WAIT
  1028.  
  1029.      Accept one character from the keyboard.
  1030.  
  1031.      ╔════════════════════════════════════════════════════════════════════╗
  1032.      ║ WAIT [TO <memvar>]                                                 ║
  1033.      ╟────────────────────────────────────────────────────────────────────╢
  1034.      ║ Option:                                                            ║
  1035.      ║                                                                    ║
  1036.      ║ TO <memvar>    store the character into this variable              ║
  1037.      ╚════════════════════════════════════════════════════════════════════╝
  1038.  
  1039.           When VP-Info Level 1 encounters the WAIT command, the program
  1040.      execution stops, the message: WAITING is displayed; VP-Info Level 1
  1041.      waits for a character to be entered at the keyboard.   When a key is
  1042.      hit, program execution continues.
  1043.  
  1044.           If the option: TO <memvar> is used, the character is stored in
  1045.      the string memory variable <memvar>; this cannot be a matrix variable.
  1046.      If the variable <memvar> does not exist, it will be created.
  1047.  
  1048.           This command is useful to suspend the program execution so that
  1049.      the user can read a message on the screen, and maybe make a choice.
  1050.  
  1051.           See also the INKEY( function.
  1052.  
  1053.           Examples:
  1054.  
  1055.           1. A program segment:
  1056.  
  1057.      @ 20,0 SAY 'Turn the printer on. Hit any key when ready.'
  1058.      WAIT
  1059.  
  1060.           After the message is displayed, VP-Info Level 1 waits for the
  1061.      user to hit a key indicating that the printer is now on.
  1062.  
  1063.           2. A typical, simple menu using WAIT:
  1064.  
  1065.      DO WHILE T
  1066.         ERASE
  1067.         TEXT
  1068.                                  MENU
  1069.  
  1070.            1. General Ledger
  1071.            2. Invoicing
  1072.            3. Receivables
  1073.  
  1074.            Type in your choice:
  1075.         ENDTEXT
  1076.  
  1077.  
  1078.  
  1079.      WAIT                       VPI1  VPI  VPIN                        WAIT
  1080.      VP-Info Level 1 Reference Manual           Page 399          SECTION 4
  1081.  
  1082.  
  1083.         WAIT TO ans
  1084.         IF ans>'0' .OR. ans<'4'
  1085.            BREAK
  1086.         ENDIF
  1087.      ENDDO
  1088.      DO CASE
  1089.         CASE ans='1'
  1090.            DO ...
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.      WAIT                       VPI1  VPI  VPIN                        WAIT
  1137.      VP-Info Level 1 Reference Manual           Page 400          SECTION 4
  1138.  
  1139.  
  1140.  
  1141.                                      WINDOW
  1142.  
  1143.      Defines the active window, that part of the screen to which relative
  1144.      output can be sent.
  1145.  
  1146.      ╔════════════════════════════════════════════════════════════════════╗
  1147.      ║ WINDOW                                                             ║
  1148.      ║ WINDOW <row1>,<row2> [COLOR <windowcolor> [<bordercolor>]]         ║
  1149.      ║ WINDOW <row1>,<col1>,<row2>,<col2> [COLOR <windowcolor>            ║
  1150.      ║     [,<bordercolor>]] [BLANK/DOUBLE]                               ║
  1151.      ║                                                                    ║
  1152.      ║ <row1>,<row2>  the top and bottom of the window to be created;     ║
  1153.      ║                  with no column numbers given, the window is       ║
  1154.      ║                  full width with no border permitted               ║
  1155.      ║ <row1>,<col1>  the coordinates of the top-left corner of the window║
  1156.      ║ <row2>,<col2>  the coordinates of the bottom right corner of the   ║
  1157.      ║                  window                                            ║
  1158.      ╟────────────────────────────────────────────────────────────────────╢
  1159.      ║ Options:                                                           ║
  1160.      ║                                                                    ║
  1161.      ║ COLOR <windowcolor>   the color of the area inside the window      ║
  1162.      ║       <bordercolor>   the color of the window border               ║
  1163.      ║ BLANK                 the window has no border                     ║
  1164.      ║ DOUBLE                the window double-line borders (default      ║
  1165.      ║                         single-line borders)                       ║
  1166.      ╚════════════════════════════════════════════════════════════════════╝
  1167.  
  1168.           Unlike the BOX command, WINDOW erases the area within the
  1169.      coordinates given, and if corners are specified, displays an optional
  1170.      border one space outside the border coordinates.
  1171.  
  1172.           Although the fixed-position display commands like @ SAY can write
  1173.      either inside or outside the window, all the relative display commands
  1174.      like ?, ??, LIST, DISPLAY, TEXT, etc., are restricted to the active
  1175.      window.
  1176.  
  1177.           The window can be deactivated (i.e., reset to the entire screen
  1178.      size) by the WINDOW command alone.
  1179.  
  1180.           The rows are numbered 0 to 24. Since a row is always allowed
  1181.      above and below the window coordinates, the actual range of row
  1182.      numbers for the WINDOW command is 1 through 23.
  1183.  
  1184.           The columns are numbered 0 to 79. Since a column is always
  1185.      allowed to the left and right of the window coordinates, the actual
  1186.      range of column numbers for the WINDOW command is 1 through 78.
  1187.  
  1188.           Note that commas are required between coordinates, but are not
  1189.      permitted before the keywords COLOR, BLANK, and DOUBLE.
  1190.  
  1191.  
  1192.  
  1193.      WINDOW                     VPI1  VPI  VPIN                      WINDOW
  1194.      VP-Info Level 1 Reference Manual           Page 401          SECTION 4
  1195.  
  1196.  
  1197.  
  1198.           In programs, WINDOW is often used to position TEXT and may be
  1199.      useful in setting up BROWSE, EDIT, WRITE and other input/output
  1200.      displays.
  1201.  
  1202.           Examples:
  1203.  
  1204.           1.  Use WRITE to edit a file in the bottom half of the screen:
  1205.  
  1206.      CLS
  1207.      CURSOR 5,20
  1208.      ACCEPT "Enter name of file to edit " to fil_nam
  1209.      WINDOW 8,5,22,74 color 7,112 double
  1210.      WRITE &fil_nam OFF
  1211.      WINDOW
  1212.  
  1213.           2.  Use BROWSE with a TEXT file in a window:
  1214.  
  1215.      USE customer
  1216.      WINDOW 2,22 color 112
  1217.      BROWSE TEXT customer
  1218.      WINDOW
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.      WINDOW                     VPI1  VPI  VPIN                      WINDOW
  1251.      VP-Info Level 1 Reference Manual           Page 402          SECTION 4
  1252.  
  1253.  
  1254.  
  1255.                                      WRITE
  1256.  
  1257.      Activate the program editor.
  1258.  
  1259.      ╔════════════════════════════════════════════════════════════════════╗
  1260.      ║ WRITE [<file>/.<volume>/M.<file>] [OFF]                            ║
  1261.      ╟────────────────────────────────────────────────────────────────────╢
  1262.      ║ Options:                                                           ║
  1263.      ║                                                                    ║
  1264.      ║ <file>     name of file to be created or edited                    ║
  1265.      ║ <volume>   number of a volume in the current library; a numeric    ║
  1266.      ║              expression                                            ║
  1267.      ║ <memo>     name of a memo field in the current data file           ║
  1268.      ║ OFF        omit header and opportunity to rename file or volume    ║
  1269.      ╚════════════════════════════════════════════════════════════════════╝
  1270.  
  1271.           A simple program editor is provided to make it possible to write
  1272.      and edit programs in VP-Info Level 1.  If <file>, <volume> or <memo>
  1273.      is not specified, the last file used is understood to be the file to
  1274.      edit. If no extension is specified, PRG is assumed.  This editor is
  1275.      very useful for debugging programs and reports.
  1276.  
  1277.           Note that library volumes are addressed by placing a period in
  1278.      front of the volume number, which can be either a numeric constant or
  1279.      a numeric expression.  Memos are addressed by preceding the field name
  1280.      with "M."  Do not confuse this usage of periods with a decimal point.
  1281.  
  1282.           OFF causes WRITE to omit the top three lines of the screen (file
  1283.      name and ruler, etc.) and places the cursor at the beginning of the
  1284.      file in the top left corner of the current window (the entire screen
  1285.      if no window is active), and to save the file immediately upon sensing
  1286.      the <End> key without giving an opportunity to change the file name.
  1287.      WRITE OFF is used primarily inside programs under program control, and
  1288.      with an active window.
  1289.  
  1290.           The editing keys are the same as in full-screen editing.  WRITE
  1291.      uses an 80 character "window" for its 254 character lines.
  1292.  
  1293.           The maximum size of a text file is about 20,000 characters with
  1294.      no data files open.  Using data and index files reduces space
  1295.      available for WRITE, as does running WRITE inside a program; consider
  1296.      running WRITE from a subroutine instead of the main routine if maximum
  1297.      file size is required.
  1298.  
  1299.           Editing keys:
  1300.  
  1301.      <Left> or Ctrl-S        moves the cursor back one character
  1302.      <Right> or Ctrl-D       moves the cursor forward one character
  1303.      <Up> or Ctrl-E          moves the cursor to the previous line
  1304.      <Dn> or Ctrl-X          moves the cursor to the next line
  1305.  
  1306.  
  1307.  
  1308.      WRITE                      VPI1  VPI  VPIN                       WRITE
  1309.      VP-Info Level 1 Reference Manual           Page 403          SECTION 4
  1310.  
  1311.  
  1312.  
  1313.      Ctrl-<Left>             moves to the beginning of the line
  1314.      Ctrl-<Right>            moves to the end of the line
  1315.  
  1316.      Ctrl-<Home>             moves to the beginning of the document
  1317.      Ctrl-<End>              moves to the end of the document
  1318.  
  1319.      Ctrl-N                  inserts a new line
  1320.      Ctrl-T                  deletes the line
  1321.  
  1322.      <PgUp> or Ctrl-R        displays previous page
  1323.      <PgDn> or Ctrl-C        displays next page
  1324.  
  1325.      <BACKSPACE>             deletes the character to the left of the
  1326.                                 cursor
  1327.      <Del> or Ctrl-G         deletes the character on the cursor
  1328.      Ctrl-Y                  deletes the rest of the line
  1329.  
  1330.      <Ins> or Ctrl-V         puts you in insert mode: what you type gets
  1331.                                 inserted  (normally, you are in overtype
  1332.                                 mode:  what you type overtypes the existing
  1333.                                 text); pressing <Ins> or Ctrl-V again, puts
  1334.                                 you back into overtype mode
  1335.  
  1336.      <End> or Ctrl-W         quits and updates text
  1337.      Ctrl-Q                  quits and does not update text
  1338.  
  1339.      Ctrl-P                  prints entire document on printer
  1340.      Alt-F                   formats program
  1341.      Alt-H                   displays a help screen
  1342.  
  1343.           To break a line into two, press <Ins> to get into insert mode,
  1344.      and press <ENTER>.  To merge two lines, delete the end of line
  1345.      character.  When you leave the line (with a cursor key or <End>), the
  1346.      two lines merge.
  1347.  
  1348.           Alt-F formats program files; it indents the lines according to
  1349.      the program structures and capitalizes the first command verb on every
  1350.      line.
  1351.  
  1352.           When using WRITE, Alt-H displays the following information (press
  1353.      any key, and the help screen disappears):
  1354.  
  1355.           You may use WRITE to transfer any text (up to the available 
  1356.      memory limit) between any two forms -- DOS file to library, or DOS file
  1357.      to memo field, for example -- by importing it into WRITE and changing
  1358.      its name to another valid form before saving the text.
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.      WRITE                      VPI1  VPI  VPIN                       WRITE
  1366.      VP-Info Level 1 Reference Manual           Page 404          SECTION 4
  1367.  
  1368.  
  1369.  
  1370. ──────────────────────────────────────────────────────────────────────────────
  1371. GENERAL.PRG                        VP-Info WRITE  (Press Alt-H for Help)
  1372.  
  1373. ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
  1374.  
  1375. ┌────────────────────────────────────────────────────────────────────────────┐
  1376. │                           VP-Info WRITER HELP                              │
  1377. │                                                                            │
  1378. │Delete and Insert              Block Commands           Miscellaneous       │
  1379. │═════════════════              ═══════════════          ═════════════       │
  1380. │Delete character..... <Del>    Mark block.... Alt-B     QUIT:               │
  1381. │Delete to end of line  ^Y      Move block.... Alt-M     with save.... <End> │
  1382. │                               Copy block.... Alt-C     without save.  ^Q   │
  1383. │Delete line..........  ^T      Delete block.. Alt-D                         │
  1384. │Insert line..........  ^N      Remove marks.. Alt-K     PRINT TEXT...  ^P   │
  1385. │                                                                            │
  1386. │Insert-mode toggle... <Ins>    Tab.......... TAB Key    FORMAT PROGRAM Alt-F│
  1387. │                                                                            │
  1388. │ ┌─────────────────────────── FAST CURSOR MOVEMENT ───────────────────────┐ │
  1389. │ │  End of line... ^<Rght>  Page up....... <PgUp>  Top of text... ^<Home> │ │
  1390. │ │  Start of line. ^<Lft>   Page down..... <PgDn>  Bottom of text ^<End>  │ │
  1391. │ └────────────────────────────────────────────────────────────────────────┘ │
  1392. │                                                                            │
  1393. │NOTES:  1. ^ is Ctrl   2. Keys in pointed brackets are on the Numeric Keypad│
  1394. └────────────────────────────────────────────────────────────────────────────┘
  1395.                                                  Press any key to continue ...
  1396. ──────────────────────────────────────────────────────────────────────────────
  1397.  
  1398.           Examples:
  1399.  
  1400.      1>WRITE test             ;write TEST.PRG
  1401.      1>WRITE test.txt         ;write TEST.TXT
  1402.      1>WRITE test.dat OFF     ;write TEST.DAT with suppression of header
  1403.      1>WRITE .65              ;write volume 65 in the current library
  1404.      1>WRITE .num             ;write volume number contained in NUM in the
  1405.                                 current library
  1406.      1>WRITE .num OFF         ;write volume number contained in NUM in the
  1407.                                 current library with suppression of header
  1408.      1>WRITE .:avail          ;write the next available volume (Caution: be
  1409.                                 sure to capture this value before using
  1410.                                 this construct or you'll never be able to
  1411.                                 find your text again.)
  1412.      1>WRITE m.credit         ;write a memo referenced by the memo field 
  1413.                                 CREDIT in the current data file
  1414.      1>WRITE m.credit#3       ;write a memo referenced by the memo field 
  1415.                                 CREDIT in data file currently open in work
  1416.                                 area 3
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.      WRITE                      VPI1  VPI  VPIN                       WRITE
  1423.      VP-Info Level 1 Reference Manual           Page 405          SECTION 4
  1424.  
  1425.  
  1426.  
  1427.                                       ZAP
  1428.  
  1429.      Erase all records in the selected file.
  1430.  
  1431.      ╔════════════════════════════════════════════════════════════════════╗
  1432.      ║ ZAP                                                                ║
  1433.      ╚════════════════════════════════════════════════════════════════════╝
  1434.  
  1435.           This command erases all the records.  This is not a DELETE.  The
  1436.      records cannot be recalled!  Use this command with care!
  1437.  
  1438.           If the selected file is indexed, it is automatically reindexed
  1439.      after ZAP.
  1440.  
  1441.           ZAP releases the disk space previously used by the records of the
  1442.      data file.
  1443.  
  1444.           On a network with SET NETWORK ON in VP-Info Professional Network
  1445.      Edition, attempting to ZAP while another user is accessing the file
  1446.      will cause a LOCK error.  Always LOCK the file before ZAP.
  1447.  
  1448.           Example:
  1449.  
  1450.      1>USE employee
  1451.      1>COPY TO empl1
  1452.      1>USE empl1
  1453.      1>ZAP
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.      ZAP                        VPI1  VPI  VPIN                         ZAP
  1478.